1. Field of the Invention
This invention relates to a position detecting apparatus which includes a sensor unit having a two-phase output, an instantaneous value detecting unit associated with the sensor output, a direct-current (DC) component detecting unit associated with the instantaneous value detecting unit, and a position detecting unit which subtracts a detected DC component from the sensor output to detect a position of an object.
2. Description of the Prior Art
FIG. 1 shows a prior art position detecting apparatus wherein a rotary member 1, which is the object of the detection, has attached a gear member 2 made of a permeable material, and wherein magnetic sensors 3, 4 and a magnet 5 are arranged to oppose the gear 2. The outputs V.sub.x and V.sub.y from the magnetic sensors 3 and 4 are respectively applied to the inputs of sample and hold circuits (S/H) 11 and 12 of an instantaneous value detecting unit 10, as well as to the inputs of comparator circuits 21 and 22 of a position high-order digit detecting circuit 20. The outputs of the sample and hold circuits 11 and 12 are respectively applied to the inputs of A/D converters 13 and 14, and thus digitized instantaneous values S.sub.x and S.sub.y are respectively applied to the inputs of subtracters 31 and 32 of a position detecting unit 30. The outputs from the comparator circuits 21 and 22 are applied to the inputs of a pulse counter 23 where the comparator outputs are counted. The high-order digit data TN at the positions counted are applied to the input of an adder 35 of the position detecting unit 30. The inputs of subtracters 31 and 32 are applied with direct-current component data V.sub.a and V.sub.b which have been measured and stored respectively, the remainders V.sub.1 =Vcos.THETA. and V.sub.2 =Vsin.THETA. are applied to the input of a divider 33, and the thus obtained quotient V.sub.2 /V.sub.1 is applied to the input of a tan.sup.-1 circuit 34.
FIG. 2 is an operational flow chart of the structure mentioned above. When the rotary member 1 rotates, the gear member 2 rotates, and the sensor unit made up of the gear member 2, the magnetic sensors 3, 4 and the magnet 5 generates two-phase alternating current signals V.sub.x and V.sub.y : EQU V.sub.x =Vcos.THETA.+V.sub.a EQU V.sub.y =Vsin.THETA.+v.sub.b ( 1)
When the instantaneous value unit 10 detects the digital instantaneous values S.sub.x and S.sub.y of the two -phase AC signals V.sub.x and V.sub.y (Step S10), the position high-order digit detecting circuit 20 calculates the high-order data TN of the position signals which correspond to the number of teeth of the gear 2 which have passed through the magnetic sensors 3, 4. When the gear member 2 rotates together with the rotary member 1, the magnetic flux transmitted through the magnetic sensors 3 and 4 differs depending on the position of the rotary member 1 because of the configuration of the outer periphery of the gear member 2, whereby the magnetic sensors 3 and 4 generate signals V.sub.x and V.sub.y of the above equation (1) corresponding to the position of the object. The phase of the AC component included in the output signals V.sub.x and V.sub.y from the magnetic sensors 3 and 4 is set at 90.degree. by making the interval between the magnetic sensors 3 and 4 correspond to one quarter of the gear pitch of the gear member 2. The position high-order digit detecting circuit 20 detects the number of gear teeth of the object which have passed through the magnetic sensors 3, 4, or the positional high-order digits, and the comparator circuits 21 and 22 convert the signals V.sub.x and V.sub.y output from the magnetic sensors 3 and 4 into pulses and the counter 23 counts the number of respective pulses. The instantaneous value detecting unit 10, including the sample and hold circuits 11, 12 and the A/D converters 13, 14, detects in digital values the instantaneous values of the two-phase AC signals V.sub.x and V.sub.y from the magnetic sensors 3 and 4. The subtracters 31 and 32 of the position detecting unit 30 subtract respectively the DC component data V.sub.a and V.sub.b which have been measured and stored in advance from the digital instantaneous values S.sub.x and S.sub.y output from the instantaneous value detecting unit 10 to obtain AC component signals Vcos.THETA. and Vsin.THETA., or to obtain the result of the subtraction of DC components V.sub.a and V.sub.b from the two-phase AC signals V.sub.x and V.sub.y (Step S11). The ratio between the AC component signals Vcos.THETA. and Vsin.THETA., or tan .THETA.=Vsin.THETA./Vcos.THETA., is obtained by the divider 33 and the position .THETA. of the gear member 2 is detected by executing the inverse trigonometric function conversion tan.sup.-1 using the tan.sup.-1 circuit 34 (Step S12). ##EQU1## By adding the value to the position high-order digit data TN from the detecting unit 20 at a downstream adder 35, an arbitrary position of the gear member 2 and hence, the rotary member 1, is detected as a positional signal PS (Step S13).
The aforementioned prior art position detecting apparatus uses values which have been measured and stored in advance as the DC component values V.sub.a and V.sub.b of equation (1).
However, in practice, the values of DC components V.sub.a and V.sub.b constantly change due to temperature changes, varying moving rates of the object, variations in the distance from the object to the sensor, or various other factors. The prior art position detecting apparatus is not sufficiently adaptive to those variations and therefore, the position PS detected in the Step S13 according to equation (2) is deviated from the actual position of the object.